package show.marvelous.domain.chessgame.aggregate.entity;

import lombok.Data;
import lombok.NonNull;
import org.jilt.Builder;
import org.jilt.BuilderStyle;
import show.marvelous.domain.chessgame.constans.AirPlanColorEnum;
import show.marvelous.domain.chessgame.constans.PieceCodeEnum;

/**
 * The type Play record vo.
 * @author Kris  2021/8/24
 */
@Data
@Builder(style = BuilderStyle.TYPE_SAFE)
public class PlayRecord{

    @NonNull
    private final Long id;
    @NonNull
    private final PieceCodeEnum code;
    @NonNull
    private final DiceRecord diceRecord;

    public AirPlanColorEnum getColor(){
        return diceRecord.getColor();
    }

    public Integer getStep(){
        return diceRecord.getStep();
    }
}
